Repository navigation
Run MySQL checks on the server instead of copying the table - #1863
Open
Krrishkumar125 wants to merge 2 commits into
Open
Krrishkumar125 wants to merge 2 commits into
Krrishkumar125 wants to merge 2 commits into
Conversation
A MAX over bulk_orders still makes MySQL send every column of every row.
Each model is a view over a read-only attachment, and DuckDB sends the aggregates it can. A quality rule still cannot call mysql_query.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1602.
datacontract testcopied each MySQL table into DuckDB, then ran the checks on the copy. AMAXon a large table read every row first.Each model is now a view over a read-only MySQL attachment. DuckDB runs the check and sends MySQL the filters and aggregates it can. Quality rules are still DuckDB SQL. A rule cannot call
mysql_queryor name the attached catalog, so it cannot use the credentials to read another table.A check DuckDB cannot push, such as a count of nulls, still reads that column. It no longer copies every column before the query.
The new test reads MySQL's general log. Before this change the server received
SELECT n, label FROM test.bulk_orders. After it, that contract receivesSELECT MAX(n)andSELECT COUNT(*) ... WHERE n < 0. The existing MySQL checks still pass.